<template>
  <div class="box page-miH page-bgBack">
    <a-tabs default-active-key="potential" @change="v => (componentName = v)">
      <a-tab-pane :key="item.type" v-for="item in numArr">
        <span slot="tab">
          <a-badge :count="item.num" :offset="[5, -2]">{{ item.name }}</a-badge>
        </span>
      </a-tab-pane>
    </a-tabs>
    <div :is="componentName"></div>
  </div>
</template>

<script>
import potential from "./potential";
import signing from "./signing";
export default {
  components: {
    potential,
    signing
  },
  data() {
    return {
      componentName: "potential",
      numArr: [
        { type: "potential", name: "潜在客户", num: 0 },
        { type: "signing", name: "签约客户", num: 0 }
      ]
    };
  }
};
</script>

<style lang="scss" scoped>
.box {
  padding: 0 24px 24px 24px;
  ::v-deep.ant-tabs-tab {
    line-height: 60px;
    padding-top: 0px;
    height: 60px;
  }
  ::v-deep.ant-tabs-bar {
    margin-bottom: 24px !important;
  }
}
</style>
